Monotonic counters are typically used in computer systems to maintain a count that can only be incremented, or decremented, over a respective lifetime of the counter, i.e., the count of the monotonic counter can only vary in one direction. Monotonic counters help ensure, for example, a prior count or an event based on a prior count will not happen again. Monotonic counters may be used, for example, for assigning unique numbers or identifiers.
For example, monotonic counters can be used in a pre-paid cash card. In general, such a pre-paid cash card includes a balance value that reflects a current remaining amount of a previously deposited amount of cash. Every time the pre-paid cash card is used by a respective user for purchase, such a balance value should decrease accordingly. In some cases, however, a hacker or malicious user can make a backup of a balance value during, or after, a previous purchase, and repeat replacing a current balance value with the backup. As such, the hacker or malicious user may never run out of a “backup” balance value, which is typically known as a rewind attack, or a backup attack. In this regard, the monotonic counter is typically integrated into such a cash card to generate a unique count, which is incremented by one every time the user uses the cash card. Since such a count provided by the monotonic counter cannot be reversed or altered, a merchant may rely on the count to detect whether a backup attack occurs.
In general, various one-time programmable memory devices (e.g., eFuse devices, anti-eFuse devices, etc.) are employed by conventional monotonic counters to provide such counts because of their non-reversible characteristics. However, a respective lifetime of the conventional monotonic counter is typically limited by a respective number of such one-time programmable memory devices. In other words, every time the conventional monotonic counter provides an updated count, a respective one of the one-time programmable memory devices is nullified (i.e., cannot be used), which disadvantageously limits the lifetime of the conventional monotonic counter. Thus, conventional monotonic counters using one-time programmable memory devices have not been entirely satisfactory.